import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';

/*
  Generated class for the WebcastFavoriteListProvider provider.

  See https://angular.io/guide/dependency-injection for more info on providers
  and Angular DI.
*/
@Injectable()
export class WebcastFavoriteListProvider {

  constructor(public http: HttpClient) {

  }

  getCastFavoriteList() {
      // return this.http.get('./assets/json-data/cast-favorite.json');

      return this.http.get('/livestreaming/v1/favorites?not-loading=0');
  }

  optFavorite(castId: number, optStatus: number) {
      return this.http.post('/livestreaming/v1/optfavorite?not-loading=0',{"castId":castId, "optStatus":optStatus}, {responseType: 'text'});
  }

}
